package com.shunli.cterminal.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.examples.core.mybatis.base.BaseSafeEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import static com.examples.core.tool.utils.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

/**
 * 商品管理 DO
 *
 * @author 芋道源码
 */
@Data
@NoArgsConstructor
@TableName(value ="system_goods_manage", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@AllArgsConstructor
public class SystemGoodsManage extends BaseSafeEntity{

    private static final long serialVersionUID = 7507801613406472367L;

    /**
     * 分组ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    /**
     * 商品名称
     */
    private String name;


    /**
     * 商品类型
     */
    private String goodsRootCategory;

    private String goodsSort;


    /**
     * 商品类目ID
     */
    private Long goodsCategoryId;


    /**
     * 商品类目Code
     */
    private String goodsCategoryCode;

    /**
     * 商品品牌ID
     */
    private Long goodsBrandId;

    /**
     * 成本价格
     */
    private BigDecimal costPrice;

    /**
     * 基本售价
     */
    private BigDecimal salePrice;

    /**
     * 商品图片
     */
    private String imgUrl;

    /**
     * 商品规格数据
     * 规格属性状态，0：统一规格，1：多规格
     */
    private String propertyStatus;

    /**
     * 详情描述
     */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String detailedDescription;


    /**
     * 活动进行状态
     */
    private String activityStatus;

    /**
     * 启用状态
     */
    private String status;

    /**
     * 商品详情
     */
    private String goodsDesc;
    /**
     * 业务商品款式编码
     */
    private String mallId;
    /**
     * 业务商品skuId
     */
    private String skuId;

    /**
     * 库存
     */
    private Integer stock;

    private String supplierId;

    private String shipWay;

    private String asType;

    private String timeLimit;

    /**
     * 款式名称
     */
    private String styleName;

    @Schema(description = "举办时间")
    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime holdStartTime;

    @JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime holdEndTime;

    /**
     * 业务线 0-普通 1-logo设计 2-起名
     */
    private String businessLink;

}